package entity;

import java.io.Serializable;
import javax.persistence.*;


/**
 * The persistent class for the company database table.
 * 
 */
@Entity
@Table(name="company")
public class Company implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="id_user")
	private Integer idUser;

	private String email;

	private String name;

	//bi-directional many-to-one association to Area
    @ManyToOne
	@JoinColumn(name="area")
	private Area areaBean;

	//bi-directional one-to-one association to User
	@OneToOne(cascade={CascadeType.ALL})
	@JoinColumn(name="id_user", insertable=false, updatable=false)
	private User user;

    public Company() {
    }

	public Integer getIdUser() {
		return this.idUser;
	}

	public void setIdUser(Integer idUser) {
		this.idUser = idUser;
	}

	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Area getAreaBean() {
		return this.areaBean;
	}

	public void setAreaBean(Area areaBean) {
		this.areaBean = areaBean;
	}
	
	public User getUser() {
		return this.user;
	}

	public void setUser(User user) {
		this.user = user;
	}
	
}